package com.zjun.demo.experimentaldemo.app

import android.app.Application
import android.content.Context
import com.orhanobut.logger.AndroidLogAdapter
import com.orhanobut.logger.Logger
import com.zjun.demo.experimentaldemo.utils.NetWorkUtils
import kotlin.properties.Delegates

class App : Application() {

    companion object {

        var CONTEXT: Context by Delegates.notNull()

    }

    override fun onCreate() {
        super.onCreate()
        CONTEXT = this
        NetWorkUtils.init(this)
        Logger.addLogAdapter(object : AndroidLogAdapter() {
            override fun isLoggable(priority: Int, tag: String?): Boolean {
                return true
            }
        })
    }

}